Text Library Object
The Text library object functions enable you to perform various actions on text strings, such as comparing text strings, concatenating texts, and counting the number of characters in a text string. Two new Text library object functions were added in version 7.3: Is Integer and Replace Special Characters.
The functions are exposed under Project > References > Library References > Direct.Shared.Library > Text.
Function / Event |
Return Value |
Description |
Compare Two Strings Ignoring Case | Boolean | Compares two text strings. This compare is not case-sensitive. |
Concatenate | Text | Concatenates two or more text strings. |
Convert to lower case | Text | Converts all uppercase letters in a text string to lowercase. |
Convert to upper case | Text | Converts all lowercase letters in a text string to upper case. |
Extract prefix subtext which excludes character set | Text | Extracts the left-most sequence of a text string that does not contain characters from a given set. The function stops extracting text when a character that is included in the set is found. |
Extract prefix subtext which includes character set | Text | Extracts the left-most sequence of a text string that contains characters from a given set. The function stops extracting text when a character that is not included in the set is found. |
Extract Subtext |
Text |
Extracts a subtext of a specified length from the source text, starting at the specified position (1-based). |
Find Char Position |
Number |
Finds the first position (1-based) of any of the characters in a set in a specified text. |
Find Subtext Position |
Number |
Finds the start index (1-based) of a subtext in a text. |
Find Subtext Using Wildcard |
Number |
Finds the position of a subtext in a text. Wildcard characters (any number of ? or a single *) can be used in the same manner of the LIKE operator of SQL. |
Insert Subtext |
Text |
Inserts a subtext into a text, according to a specified subtext and location. |
Is Empty Or Has Spaces |
Boolean |
Checks whether the given text is empty or contains only spaces. |
Is Integer |
Boolean |
Checks whether the given text is integer. If the text includes an integer together with a special character, such as 2309$, the function will not consider it to be an integer. |
Length Of Text |
Number |
Counts the characters in a text. |
Logical to Visual |
Text |
Converts a string from logical to visual. This is used for international text such as Hebrew. For more information, see Visual vs. logical ordering of text. (This link was active at the time of this publication. It is not maintained by NICE.) |
Pad Text |
Text |
Concatenates a text with another text according to a specified number of repetitions and a specified length. |
Remove Spaces From String |
Text |
Removes all occurrences of white spaces from the specified text. |
Repeat Text |
Text |
Concatenates a given number of text repetitions. |
Replace Special Characters |
Text |
Replaces special characters in the source text with a specified text. This function supports the characters of Latin languages. To replace multiple special characters in the source text with one new text, enter the multiple characters without any separators, for example, $&#. If the Special Characters parameter is empty, the function will replace all the special characters in the source text with the new text. |
Replace Subtext | Text | Replaces a character or subtext with another in the specified text. |
Reverse extract subtext | Text | Extracts a subtext of a specified length from the source text, starting at the end of the source text. |
Reverse find subtext | Number | Finds the start index (1-based) of a subtext in a text starting at the end of the text. |
Reverse the order of characters | Text | Splits the text by a delimiter and outputs the result as a text list. |
Split | List of Text | Splits the text by a delimiter and outputs the result as a text list. |
Split by delimiters | List of Text | Splits the source text by one or more delimiters. |
Substring from Left of the String | Text | Extracts a substring of a specified length from the left of the source text. |
Substring from Right of the String | Text | Extracts a substring of a specified length from the right of the source text. |
Trim | Text | Removes all occurrences of white space characters from the beginning and the end of the source text. |
Trim End | Text | Removes all occurrences of white space characters from the end of the source text. |
Trim Start | Text | Removes all occurrences of white space characters from the beginning of the source text. |
Wild Compare | Boolean | Compares specified text to a pattern. The pattern can include the wild cards * and ?. |